This invention relates to machines that produce an action in response to sensed conditions in discontinuous steps according to instructions stored in memories, specifically to a machine that establishes its own instructions according to the most likely action state previously encountered by the machine in each step for each sensed condition in each step.